package com.sms.common.exception;

import com.sms.common.result.ResultCode;
import lombok.Getter;

@Getter
public class SmsException extends RuntimeException {
    
    private final Integer code;
    
    public SmsException(String message) {
        super(message);
        this.code = ResultCode.FAILED.getCode();
    }
    
    public SmsException(ResultCode resultCode) {
        super(resultCode.getMessage());
        this.code = resultCode.getCode();
    }
    
    public SmsException(ResultCode resultCode, String message) {
        super(message);
        this.code = resultCode.getCode();
    }
    
    public SmsException(Integer code, String message) {
        super(message);
        this.code = code;
    }
} 